<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="common/common::common('查看日志表')"/>
    <link rel="stylesheet" href="/static/assets/jsonview/jquery.jsonview.css">
    <script type="text/javascript" src="/static/assets/jsonview/jquery.jsonview.js"></script>
    <script>
        layui.use(['form'], function () {
            form = layui.form;
            form.render();
        });
    </script>
    <style>
        .layui-form-body {
            height: 603px;
            overflow-y: auto;
            margin-right: 0;
            padding-right: 15px;
        }

        html {
            overflow: hidden;
        }
    </style>
</head>
<body>

<form class="layui-form" id="seeMakeUseLogForm" th:object="${makeUseLog}">
    <div class="layui-form-body">
        <div class="layui-form-item">
            <label class="layui-form-label">
                日志标题
            </label>
            <div class="layui-input-block">
                <input type="text" id="menuTitle" name="menuTitle" th:field="*{menuTitle}" readonly="readonly"
                       autocomplete="off" lay-verify="required" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                操作类型
            </label>
            <div class="layui-input-block">
                <input type="text" id="makeUseType" name="makeUseType" th:field="*{makeUseType}" readonly="readonly"
                       autocomplete="off" lay-verify="required" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                操作IP地址
            </label>
            <div class="layui-input-block">
                <input type="text" id="makeUseIp" name="makeUseIp" th:field="*{makeUseIp}" readonly="readonly"
                       autocomplete="off" lay-verify="required" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                操作地址
            </label>
            <div class="layui-input-block">
                <input type="text" id="makeUseAddress" name="makeUseAddress" th:field="*{makeUseAddress}"
                       readonly="readonly" autocomplete="off"
                       lay-verify="required" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">
                返回消息
            </label>
            <div class="layui-input-block">
                <input type="text" id="msg" name="msg" th:field="*{msg}" readonly="readonly"
                       autocomplete="off"
                       lay-verify="required" class="layui-input">
            </div>
        </div>
<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">-->
<!--                请求URI-->
<!--            </label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="text" id="requestUri" name="requestUri" th:field="*{requestUri}" readonly="readonly"-->
<!--                       autocomplete="off" lay-verify="required" class="layui-input">-->
<!--            </div>-->
<!--        </div>-->

<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">-->
<!--                操作方式-->
<!--            </label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="text" id="requestMethod" name="requestMethod" th:field="*{requestMethod}"-->
<!--                       readonly="readonly" autocomplete="off"-->
<!--                       lay-verify="required" class="layui-input">-->
<!--            </div>-->
<!--        </div>-->

        <div class="layui-form-item">
            <label class="layui-form-label">
                请求参数
            </label>
            <div class="layui-input-block">
                <pre class="layui-code" id="params">
                </pre>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">
                响应数据
            </label>
            <div class="layui-input-block">
                 <pre class="layui-code" id="jsonResult">
                </pre>
            </div>
        </div>

        <div class="layui-form-item" style="margin-bottom: 20px">
            <label class="layui-form-label">
                异常信息
            </label>
            <div class="layui-input-block">
                        <textarea id="exception" name="exception" th:field="*{exception}" maxlength="200"
                                  readonly="readonly"
                                  lay-verify="required" autocomplete="off"
                                  class="layui-textarea"></textarea>
            </div>
        </div>

<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">-->
<!--                备注-->
<!--            </label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="text" id="remarks" name="remarks" th:field="*{remarks}" readonly="readonly"-->
<!--                       autocomplete="off" class="layui-input">-->
<!--            </div>-->
<!--        </div>-->


    </div>
</form>
<script th:inline="javascript">
    $(function () {
        let params = [[${makeUseLog.params}]];
        if ($.string.isNotEmpty(params) && params.length < 2000) {
            $("#params").JSONView(params);
        } else {
            $("#params").text(params);
        }
        let jsonResult = [[${makeUseLog.jsonResult}]];
        if ($.string.isNotEmpty(jsonResult) && jsonResult.length < 2000) {
            $("#jsonResult").JSONView(jsonResult);
        } else {
            $("#jsonResult").text(jsonResult);
        }
    });
</script>
</body>
</html>